<div class="layui-col-md12">
    <div class="layui-card">
        <div class="layui-card-body">
            <div class="layui-row custom-tool">
                <div class="layui-col-md6">
                    @{{if .canImport}}
                <span class="custom-upload_btn" id="handbook_account_upload">账册导入</span>
                <span class="custom-upload_btn" id="handbook_manual_upload">手册导入</span>
                @{{end}}
                </div>
                <div class="layui-col-md3 layui-col-md-offset3">
                    <div class="custom-tool-right">
                        <label class="custom-tool-right-search iconfont iconsearch"></label>
                        <input type="text" value="@{{.searchWord}}" id="company_search" placeholder="搜索手账册编号"
                               class="custom-tool-right-input layui-input">
                    </div>
                </div>
            </div>
            <div class="layui-collapse" lay-accordion>
                @{{ range  $i,$v  := .m  }}
            <div class="layui-colla-item">
                <h2 class="layui-colla-title">@{{ .Name}}</h2>
                <div class="layui-colla-content @{{if eq $i 0 }}@{{if gt (.HandBooks|len) 0 }} layui-show @{{end}}@{{end}}">
                    <div class="custom-manual-right company_contract company_show">
                        <div class="custom-manual-right-contract">
                            <div class="is_list  layui-row">
                                @{{range .HandBooks }}
                            <div class="layui-col-md4">
                                <div class="is_list_content  @{{if ge .UsefulLifeDays 30 }}
                                            health
                                          @{{else if le .UsefulLifeDays 0 }}
                                            expired
                                          @{{else }}
                                            warn
                                          @{{end}}   ">

                                    <div class="is_list_left" data-id="@{{ .Id }}"
                                         data-name="@{{ .ContractNumber }}">
                                        <a lay-href="/handbook/show/@{{.Id}}" lay-text="手账册详情">
                                            <h2>@{{ .ContractNumber }}</h2>
                                            <span class="day_number">距离核销天数：</span>
                                            <span class="is_days">@{{  .UsefulLifeDays }}天</span>
                                        </a>
                                        <span class="is_list_delete" data-id="@{{ .Id }}"><i
                                                    class="iconfont icondelete"></i></span>
                                    </div>

                                    <span class="is_status">
                                          @{{if ge .UsefulLifeDays 30 }}
                                            健康
                                          @{{else if le .UsefulLifeDays 0 }}
                                            已过期
                                          @{{else }}
                                            警告
                                          @{{end}}
                                    </span>
                                </div>
                                </a>
                            </div>
                            @{{end }}
                            </div>
                        </div>
                    </div>
                </div>
            </div>
            @{{ end }}
            </div>

            <div id="test1"></div>
        </div>
    </div>
</div>

<script type="text/html" id="car_toolbar">
    <a class="custom-edit" lay-event="show">详情</a>
    @{{if .canDelete}}
    <a class="custom-delete" lay-event="del">删除</a>
    @{{ end}}
</script>